package net.vansante.EVEMap.Route;

import java.util.Iterator;

public class RouteIterator implements Iterator<Waypoint> {
	
	private Waypoint current;
	
	public RouteIterator(Waypoint first) {
		current = first;
	}
	public boolean hasNext() {
		if (current == null) {
			return false;
		}
		return current.getNext() != null;
	}

	public Waypoint next() {
		return current = current.getNext();
	}
	public void remove() {
		throw new UnsupportedOperationException();
	}

}
